import httpInstance from "@/utils/http.js";

//获取商品种类
export function getCategoriesAPI() {
   return httpInstance({
        baseURL:'',
        url:'https://apifoxmock.com/m2/5341936-5012878-default/229352275?apifoxApiId=229352275'
    }).catch(function (err) {
        console.log("获取商品种类失败",err)
    })
}


/*获取热门商品列表*/
 export function getHotGoodsAPI(select){
     //返回promise对象
    return  httpInstance({
        url:`/goods/selectTest/category=${select}`
    }).catch(function (err) {
        console.log("获取热门商品失败",err)
    })
}

/*获取首页专家*/
export function getExpertsAPI(){
   return httpInstance({
       url: '/expert/homePageExpert'
   }).catch(function (err) {
       console.log("获取专家信息失败", err)
       throw err
   })
}

/*获取专家问答*/
export function getExpertsQAAPI(){
    return httpInstance({
        url:''
    })
}

/*获取首页文章*/
export function getArticleAPI(){
    return httpInstance({
        url:''
    })
}